package com.yuyou.tas.lesson.mapper;

import com.yuyou.tas.service.api.lesson.dto.DtoBaseSchool;
import com.yuyou.tas.service.api.lesson.entity.BaseSchool;
import com.yuyou.tas.util.bean.Pagination;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface BaseSchoolMapper {
    int deleteByPrimaryKey(Long id);

    int insert(BaseSchool record);

    BaseSchool selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BaseSchool record);

    int findSchoolCount(Pagination<DtoBaseSchool> queryPgn);

    List<DtoBaseSchool> findSchoolPageList(Pagination<DtoBaseSchool> queryPgn);

    BaseSchool selectByPKandOrgan(@Param(value="id") Long id, @Param(value="authOrganizationId") Long authOrganizationId);

    BaseSchool selectByOrgan7OId(@Param(value="oId") Long oId,@Param(value="authOrganizationId")  Long authOrganizationId);
    
    int delByOrgan7OId(@Param(value="oId")  Long oId,@Param(value="authOrganizationId") Long authOrganizationId);

    Long findMaxCode(Map<String , Object> condition);

    int findTeacherSchoolCount(Pagination<DtoBaseSchool> queryPgn);
    List<DtoBaseSchool> findTeacherSchoolPageList(Pagination<DtoBaseSchool> queryPgn);


    List<BaseSchool> getByOrganId(@Param(value = "organId") Long organId);

    List<DtoBaseSchool> selectByLimits(Pagination<DtoBaseSchool> queryPgn);

    Integer selectByLimitsCount(Pagination<DtoBaseSchool> queryPgn);

    List<DtoBaseSchool> selectAllByLimits(@Param(value = "userId") Long userId);

    List<DtoBaseSchool> findTeacherSchools(@Param(value = "userId") Long userId);


}